import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Message from '../views/Message.vue'
import MessageDetail from '@/views/MessageDetail.vue'
import Course from '@/views/Course.vue'
import Mine from '@/views/Mine.vue'
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/message',
    name:'Message',
    component: Message
  },
  {
    path: '/messagedetail/:id',
    name: 'MessageDetail',
    component: MessageDetail
  },
  {
    path: '/course',
    name: 'Course',
    component: Course
  },
  {
    path: '/mine',
    name: 'Mine',
    component: Mine
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  }
  // Add more routes as needed
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router